package per.qiao.simplerest.anno;

import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import per.qiao.simplerest.restenum.RestMethod;

import java.lang.annotation.*;

/**
 * Company: 上海数惠系统技术有限公司
 * Department: 数据中心
 * Date: 2020-05-29 11:21
 *
 * @Author: qyp
 * Email: qiaoyp@dist.com.cn
 * Desc:
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RestMapping {

    /**
     * uri
     * @return
     */
    String value() default "";

    /**
     * protocol + IP + port
     */
    String base() default "";

    /**
     * 默认使用get请求
     *
     * @see RestMethod
     * @return
     */
    RestMethod method() default RestMethod.GET;

}
